//
//  TKIMFriendProtocol.h
//  TKIM
//
//  Created by liupm on 15/12/22.
//  Copyright © 2015年 liupm. All rights reserved.
//
@protocol TKIMFriendPacketProtocol;

@protocol TKIMFriendProtocol <NSObject,TKIMFriendPacketProtocol>

@optional

/**
 *  @Author lpm, 15-09-17 16:09:25
 *
 *  @brief  添加用户
 *
 *  @param userId   用户ID
 */
-(void)addFriend:(NSString *)userId;

/**
 *  @Author lpm, 16-01-26 09:01:53
 *
 *  @brief  添加用户
 *
 *  @param userId  用户ID
 *  @param message 给对方的话
 */
-(void)addFriend:(NSString *)userId  withMessage:(NSString *)message;

/**
 *  @Author lpm, 15-11-19 12:11:01
 *
 *  @brief  设置昵称
 *
 *  @param user
 */
-(void)setFriendNickName:(TKIMUser *)user;


/**
 *  @Author lpm, 16-03-14 14:03:58
 *
 *  @brief  修改好友备注
 *
 *  @param firendUserId
 *  @param remark
 */
-(void)modifyFriendRemark:(TKIMUser *)friendUser callBack:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 15-09-17 16:09:31
 *
 *  @brief  删除用户
 *
 *  @param userId 用户ID
 */
-(void)removeFriend:(NSString *)userId callBack:(TKIMCallBack)callBack;;


/**
 *  @Author lpm, 15-10-08 15:10:38
 *
 *  @brief  查找用户
 *
 *  @param userId 用户id
 */
-(void)searchFriend:(NSString *)userId;


/**
 *  @Author lpm, 17-03-15 17:03:06
 *
 *  @brief  查找用户
 *
 *  @param userId   用户ID
 *  @param callBack 回调
 */
-(void)searchFriend:(NSString *)userId callBack:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 15-12-18 16:12:59
 *
 *  @brief  处理好友请求
 *
 *  @param userId   请求用户的ID
 *  @param isAccept 是否接受请求
 */
-(void)dealFriendRequest:(NSString *)userId isAccept:(BOOL)isAccept;


/**
 *  @Author lpm, 15-11-25 18:11:53
 *
 *  @brief  查询历史用户
 *
 *  @return
 */
-(NSMutableArray *)queryHistoryFriend;


/**
 *  @Author lpm, 15-11-26 18:11:44
 *
 *  @brief  异步查询历史用户
 *
 *  @param callBack 回调
 */
-(void)asyncQueryHistoryFriend:(void(^)(NSMutableArray *array))callBack;



/**
 *  @Author lpm, 15-12-18 16:12:34
 *
 *  @brief  通过名称查询历史用户
 *
 *  @param name 名称
 *
 *  @return
 */
-(NSMutableArray *)queryHistoryFriendByName:(NSString *)name;


@end



/**
 *  @Author lpm, 16-02-02 16:02:46
 *
 *  @brief  好友分组协议
 */
@protocol TKIMFriendPacketProtocol <NSObject>
@optional
/**
 *  @Author lpm, 15-11-26 18:11:44
 *
 *  @brief  异步查询历史用户分组
 *
 *  @param callBack 回调
 */
-(void)asyncQueryHistoryFriendGroup:(void(^)(NSMutableArray *array))callBack;


/**
 *  @Author lpm, 16-01-14 13:01:33
 *
 *  @brief  创建一个用户分组
 *
 *  @param groupName 组名
 *  @param callBack  回调
 */
-(void)creatUserPacket:(NSString *)groupName callBack:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 16-01-14 13:01:53
 *
 *  @brief  修改一个分组的名字
 *
 *  @param groupId   组ID
 *  @param groupName 组名称
 *  @param callBack  回调
 */
-(void)renameUserPacket:(NSString *)groupId groupName:(NSString *)groupName callBack:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 16-01-14 13:01:38
 *
 *  @brief  修改用户好友的分组
 *
 *  @param user 用户对象
 *  @param groupId      组ID
 */
-(void)modifyUserPacket:(TKIMUser *)user toGroup:(NSString *)groupId callBack:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 16-01-14 14:01:11
 *
 *  @brief  删除用户分组
 *
 *  @param groupId  组ID
 *  @param callBack 回调
 */
-(void)removeUserPacket:(NSString *)groupId callBack:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 16-01-14 14:01:32
 *
 *  @brief  查询用户分组列表
 *
 *  @param callBack 回调
 */
-(void)queryUserPacket:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 16-01-14 14:01:39
 *
 *  @brief  查询用户分组列表详细信息
 *
 *  @param callBack 回调
 */
-(void)queryUserPacketDetailInfo:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 16-01-14 13:01:38
 *
 *  @brief  复制用户到好友分组
 *
 *  @param user 用户对象
 *  @param groupId      组ID
 */
-(void)setUserPacket:(TKIMUser *)user toGroup:(NSString *)groupId callBack:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 17-04-05 14:04:18
 *
 *  @brief  搜索用户
 *
 *  @param keyWord  关键字（不传返回所有）
 *  @param pageNo   页数
 *  @param pageSize 每页条数
 */
-(void)searchUserByKeyWord:(NSString *)keyWord pageNo:(NSInteger)pageNo pageSize:(NSInteger)pageSize callBack:(TKIMCallBack)callBack;

@end
